package action;

import interceptor.BoardDaoAware;
import util.BoardDAO;
import util.BoardVO;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import com.opensymphony.xwork2.Preparable;

public class ModifyReadAction extends ActionSupport implements Preparable, ModelDriven, BoardDaoAware{

	private BoardDAO dao;
	private BoardVO vo;
	
	public BoardDAO getDao() {
		return dao;
	}

	public void setDao(BoardDAO dao) {
		this.dao = dao;
	}

	public BoardVO getVo() {
		return vo;
	}

	public void setVo(BoardVO vo) {
		this.vo = vo;
	}
	
	public void setBoardDao(BoardDAO dao){
		this.dao = dao;
	}
	
	public void prepare() {
		vo = new BoardVO();
	}
	
	public Object getModel() {
		return vo;
	}

	public String execute() throws Exception {
		System.out.println("readAction...()");
		System.out.println("vo="+vo);
		vo = dao.Read(vo);
		return SUCCESS;
	}

}